// pages/doing/doingSubmitResult.js
const httpUtils = require('../../utils/httpUtils')
const ui = require('../../utils/ui')
Page({
  data: {
    order_no: '',
    images: [],
      comment: ''
  },
  onLoad(options) {
    this.setData({
      order_no: options.orderNo
    })
    this.requestSubmitResult();
  },
//请求进程数据
requestSubmitResult() {
  let obj = {
    method: 'GET',
    url: '/task-order/' + this.data.order_no + '/submit-info',
    showLoading:true,
    data: {}
  }
  httpUtils.request(obj).then(res => {
    this.setData({
      images: res.data.images,
      comment: res.data.comment
    })
  }).catch(err => {
    console.log(err)
  });
},
  //点击图片预览
  previewImage(event){
    var currentUrl = event.currentTarget.dataset.src //获取当前点击图片链接
    var urls = event.currentTarget.dataset.urls //获取当前图片列表
    wx.previewImage({
      current:currentUrl,//当前点击的预览图片地址
      urls: urls,//需要预览的图片列表，这是必须设置的属性
    })
  },
})